package edu.hawaii.myisern.action;

import java.io.IOException;
import java.net.MalformedURLException;
import org.junit.Test;
import org.xml.sax.SAXException;
import junit.framework.TestCase;

/**
 * Tests IndexActionBean class
 * 
 * @author phillip le
 *
 */
public class TestEditResearcherActionBean extends TestCase {

  /** Get the test host. */
  private String testHost = System.getProperty("test.host");

  /**
   * Tests the Index action action bean.
   * 
   * @throws SAXException if error occurs with xml parser.
   * @throws MalformedURLException if error occurs with URL.
   * @throws IOException if error occurs with IO.
   */
  @Test
  public void testEditResearcher() throws SAXException, MalformedURLException, IOException {
    EditResearcherActionBean er = new EditResearcherActionBean();
    er.setErrorMessage("ERROR");
    er.setPossibleResearcherName("possible");
    er.setResearcherBioStatement("bio");
    er.setResearcherEmail("email");
    er.setResearcherName("name");
    er.setResearcherOrganization("orgs");
    er.setResearcherPictureLink("links");
    assertSame("ERROR same", "ERROR", er.getErrorMessage());
    assertSame("possible same", "possible", er.getPossibleResearcherName());
    assertSame("bio same", "bio", er.getResearcherBioStatement());
    assertSame("email same", "email", er.getResearcherEmail());
    assertSame("name same", "name", er.getResearcherName());
    assertSame("orgs same", "orgs", er.getResearcherOrganization());
    assertSame("links same", "links", er.getResearcherPictureLink());
  }
}